﻿using System;
using System.Collections.Generic;

namespace SmartCommunity.Models;

/// <summary>
/// 菜单
/// </summary>
public partial class MenuEntity
{
    /// <summary>
    /// 菜单ID
    /// </summary>
    public int MenuId { get; set; }

    /// <summary>
    /// 上级ID
    /// </summary>
    public int? ParentId { get; set; }

    /// <summary>
    /// 菜单名称
    /// </summary>
    public string MenuName { get; set; } = null!;

    /// <summary>
    /// 菜单类型
    /// </summary>
    public MenuType MenuType { get; set; }

    /// <summary>
    /// 菜单地址
    /// </summary>
    public string MenuPath { get; set; } = null!;

    /// <summary>
    /// 权限标识
    /// </summary>
    public string Permission { get; set; } = null!;

    /// <summary>
    /// 菜单图标
    /// </summary>
    public string? Icon { get; set; }

    /// <summary>
    /// 排序号
    /// </summary>
    public int SortNo { get; set; }

    /// <summary>
    /// 备注说明
    /// </summary>
    public string? Remark { get; set; }

    /// <summary>
    /// 创建人
    /// </summary>
    public string CreatedBy { get; set; } = null!;

    /// <summary>
    /// 创建时间
    /// </summary>
    public DateTime CreatedTime { get; set; }

    /// <summary>
    /// 修改人
    /// </summary>
    public string UpdatedBy { get; set; } = null!;

    /// <summary>
    /// 修改时间
    /// </summary>
    public DateTime UpdatedTime { get; set; }

    public virtual ICollection<MenuEntity> Children { get; set; } = new List<MenuEntity>();

    public virtual MenuEntity? Parent { get; set; }

    public virtual ICollection<RoleEntity> Roles { get; set; } = new List<RoleEntity>();
}
